﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Abp.Application.Services;
using FwProject.Car.Dto;
using FwProject.Restaurant.Dto;
using FwProject.TypeNumber.Dto;
using Microsoft.AspNetCore.Mvc;

namespace FwProject.Car
{
    public interface ICarInfoAppService: IApplicationService
    {
        /// <summary>
        /// 添加一辆汽车
        /// </summary>
        /// <returns>The create.</returns>
        /// <param name="input">Input.</param>
        Task<Guid> Create(CarInfoInputDto input);

        /// <summary>
        /// 修改汽车信息
        /// </summary>
        /// <returns>The create.</returns>
        /// <param name="input">Input.</param>
        Task Update(Guid id, CarInfoInputDto input);
        /// <summary>
        /// 返回汽车信息
        /// </summary>
        /// <returns>The by identifier async.</returns>
        /// <param name="id">Identifier.</param>
        [HttpGet]
        Task<CarInfoDto> GetByIdAsync(long id);
        /// <summary>
        /// 根据car编号获取car用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [HttpGet]
        Task<CarInfoDto> GetByCarIdAsync(Guid id);

        [HttpGet]
        Task<Tuple<CarInfoDto, List<TypeNumberInfoDto>>> GetByCarAndTypeNumberIdAsync(long id);
        /// <summary>
        /// 获取汽车列表
        /// </summary>
        /// <returns>The paged list async.</returns>
        /// <param name="id">汽车编号</param>

        [HttpGet]
        Task<X.PagedList.IPagedList<CarInfoDto>> GetPagedListAsync(int pageIdx, int pageSize, DateTime? begindateTime, DateTime? enddatetime);
        /// <summary>
        /// 获取当前库管登录后的所有司机
        /// </summary>
        /// <returns></returns>
        Task<long[]> GetCarUserIdList();
        /// <summary>
        /// 删除一辆汽车
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task Delete(Guid id);
        /// <summary>
        /// 返回该工厂下的所有司机和车辆信息
        /// </summary>
        /// <returns></returns>
        Task<List<CarInfoDto>> GetAllDriver();

        Task<X.PagedList.IPagedList<CarInfoDto>> GetAllPagedListAsync(int pageIdx, int pageSize, DateTime? begindateTime, DateTime? enddatetime, string factoryid,string keyword);

        Task<List<CarInfoDto>> GetCarListAsync();

        /// <summary>
        /// 获取车辆轨迹信息
        /// </summary>
        /// <returns></returns>
        Task<List<CarTrackOutputDto>> GetCarTrackAsync(string keyword);
    }
}
